package com.wu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wu.entity.sys.SPositionDo;
import com.wu.pojo.response.sys.PositionUserListResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 职务表 Mapper 接口
 * </p>
 *
 * @author wujilu
 * @since 2020-11-24
 */
public interface SPositionMapper extends BaseMapper<SPositionDo> {

    List<SPositionDo> getSPositionListByName(@Param("positionName") String positionName);

    int judgeIsExistPositionName(@Param("positionName") String positionName,@Param("positionId") Long positionId);

    List<SPositionDo> getPositionsByUserId(@Param("userId") Long userId);

    List<PositionUserListResponse> getUsersByPositionId(@Param("positionId") Long positionId);
}
